home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Inne
/
Gry
/
Carnage_Contest
/
scripts
/
CC Original
/
weapons
/
Flood.lua
< prev
next >
Wrap
Text File
|
2010-03-06
|
1KB
|
42 lines
--------------------------------------------------------------------------------
-- Weapon Flood
-- Original Carnage Contest Weapon
-- Script by DC, September 2009, www.UnrealSoftware.de
--------------------------------------------------------------------------------
-- Setup Tables
if cc==nil then cc={} end
cc.flood={}
-- Load & Prepare Ressources
cc.flood.gfx_wpn=loadgfx("weapons/flood.bmp") -- Weapon Image
setmidhandle(cc.flood.gfx_wpn)
cc.flood.sfx_attack=loadsfx("flood.ogg") -- flood Sound
--------------------------------------------------------------------------------
-- Weapon: Flood
--------------------------------------------------------------------------------
cc.flood.id=addweapon("cc.flood","Flood",cc.flood.gfx_wpn,0,2) -- Add Weapon (0 uses, first in round 2)
function cc.flood.draw() -- Draw
-- Do nothing
end
function cc.flood.attack(attack) -- Attack
if (weapon_shots<=0) then
if (attack==1) then
-- No more weapon switching!
useweapon(0)
weapon_shots=weapon_shots+1
-- Effect
playsound(cc.flood.sfx_attack)
-- Raise Water
watery(getwatery()-150)
-- Scroll to Water Surface
scroll(getplayerx(0),getwatery()-75)
-- End Turn
endturn()
end
end
end